#ifndef _UNIT_H_
#define _UNIT_H_

#include <stdio.h>

const unsigned int MAX_UNIT_PRINT_MODE = 2;

struct UnitAttribute
{
public:
	const char* unitName;
	unsigned int coefficient;
	unsigned int printModeArray[MAX_UNIT_PRINT_MODE];
};

class Unit
{
public:
        unsigned int getUnitCoefficient() const;
 	bool operator<=(const Unit &other) const;
        bool operator>(const Unit &other) const;
	const char* getUnitName() const;
	unsigned int getPrintFlag(unsigned int mode) const;
protected:
	Unit(const UnitAttribute & unitInitPara);
private:
	const unsigned int coefficient;
        const char* unitName;
        unsigned int printModeArray[MAX_UNIT_PRINT_MODE];
};
#endif
